package com.cskaoyan.javase.basic._8loop;

import java.util.Scanner;

/**
 * 死循环
 * @since 11:29
 * @author wuguidong@cskaoyan.onaliyun.com
 */
public class Demo2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (true) {
            System.out.println("请键盘录入一个整数:");
            int num = sc.nextInt();
            if (num > 0) {
                System.out.println("我今天中午吃炒饭!");
            } else if (num < 0) {
                System.out.println("我今天中午吃炒面!");
            } else {
                System.out.println("我今天学习,不吃饭!");
            }
        }
    }
}
